#include <cstdio>
#include <algorithm>
#include <cmath>

double num[105];
const double EPSILON = 1e-6;

bool cmp(double a, double b) {
    // round()  --> 四舍五入到最邻近的整数
    double da = fabs(a - round(a));
    double db = fabs(b - round(b));

    if(fabs(da - db) < EPSILON) {
        return a < b;
    }

    return da < db;
}

int main()
{
    int n;
    scanf("%d", &n);

    for(int i = 0; i < n; i++) {
        scanf("%lf", &num[i]);
    }

    std::sort(num, num + n, cmp);

    for(int i = 0; i < n; i++){
        if(i != n - 1) {
            printf("%.6lf ", num[i]);
        } else {
            printf("%.6lf\n", num[i]);
        }
    }

    return 0;
}